# coding: utf8

default_phone_type=3

phone_length = 20

db.define_table('phone_type',
    Field('name'),
#    audit_table
    )

db.define_table('phone',
    Field('phone_type_id', db.phone_type, default=default_phone_type,
          label=T("Phone Type"),
          comment=T("Phone type comment")),          
    Field('number', length=phone_length, default=None, 
          label=T("Telephone Number"),
          comment=T("(514) 384-6672 ot 514.384.6672 etx 6")),
#    audit_table,
    )

db.phone.phone_type_id.requires = IS_IN_DB(db, 'phone_type.id', '%(name)s')
